package edu.cdnu.common.dto;

import java.util.List;

import edu.cdnu.pojo.CourseClassPojo;
import edu.cdnu.pojo.CourseStudentPojo;
import edu.cdnu.pojo.CourseTeacherPojo;
import edu.cdnu.pojo.DictionaryPojo;
import edu.cdnu.pojo.StudentPojo;
import edu.cdnu.pojo.TeacherPojo;

/**
 * 课程管理页面使用的数据传输对象
 * @author ASUS AsingZ
 */
public class CourseManageDto {
	private Integer id;
	/**
	 * 课程名称
	 */
	private String name;
	/**
	 * 课程介绍
	 */
	private String description;
	/**
	 * 教学大纲
	 */
	private String syllabus;
	
	// ------------------------------------------------------- 这里是对应管理 start
	/**
	 * 上课教师 对应关系 列表
	 */
	private List<CourseTeacherPojo> teacherRelationship;
	/**
	 * 参与学生 对应关系列表
	 */
	private List<CourseStudentPojo> studentRelationshipList;
	/**
	 * 参与班级 对应关系 列表
	 */
	private List<CourseClassPojo> classRelationshipList;
	// ------------------------------------------------------- 这里是对应管理 end
	
	/**
	 * 上课教师列表
	 */
	private List<TeacherPojo> teacherList;
	/**
	 * 上课班级列表
	 */
	private List<DictionaryPojo> classList;
	/***
	 * 参与学生列表
	 * 这个学生列表应该不包含在 班级里面有这个课的学生里面
	 * 应该是脱离班级单独有这个课程的学生使用这个保存
	 * 在前端先通过班级查询学生，再添加这个里面的学生
	 */
	private List<StudentPojo> studentList;
	
	public CourseManageDto() {
		super();
	}

	public CourseManageDto(Integer id, String name, String description, String syllabus,
			List<CourseTeacherPojo> teacherRelationship, List<CourseStudentPojo> studentRelationshipList,
			List<CourseClassPojo> classRelationshipList, List<TeacherPojo> teacherList, List<DictionaryPojo> classList,
			List<StudentPojo> studentList) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
		this.syllabus = syllabus;
		this.teacherRelationship = teacherRelationship;
		this.studentRelationshipList = studentRelationshipList;
		this.classRelationshipList = classRelationshipList;
		this.teacherList = teacherList;
		this.classList = classList;
		this.studentList = studentList;
	}
	/**
	 * 只有前面课程的属性
	 * @param id
	 * @param name
	 * @param description
	 * @param syllabus
	 */
	public CourseManageDto(Integer id, String name, String description, String syllabus) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
		this.syllabus = syllabus;
	}

	/**
	 * 将三个对应关系set进去
	 * @param teacherRelationship
	 * @param studentRelationshipList
	 * @param classRelationshipList
	 */
	public void setRelationshipList(List<CourseTeacherPojo> teacherRelationship, List<CourseStudentPojo> studentRelationshipList,
			List<CourseClassPojo> classRelationshipList) {
		this.teacherRelationship = teacherRelationship;
		this.studentRelationshipList = studentRelationshipList;
		this.classRelationshipList = classRelationshipList;
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getSyllabus() {
		return syllabus;
	}

	public void setSyllabus(String syllabus) {
		this.syllabus = syllabus;
	}

	public List<CourseTeacherPojo> getTeacherRelationship() {
		return teacherRelationship;
	}

	public void setTeacherRelationship(List<CourseTeacherPojo> teacherRelationship) {
		this.teacherRelationship = teacherRelationship;
	}

	public List<CourseStudentPojo> getStudentRelationshipList() {
		return studentRelationshipList;
	}

	public void setStudentRelationshipList(List<CourseStudentPojo> studentRelationshipList) {
		this.studentRelationshipList = studentRelationshipList;
	}

	public List<CourseClassPojo> getClassRelationshipList() {
		return classRelationshipList;
	}

	public void setClassRelationshipList(List<CourseClassPojo> classRelationshipList) {
		this.classRelationshipList = classRelationshipList;
	}

	public List<TeacherPojo> getTeacherList() {
		return teacherList;
	}

	public void setTeacherList(List<TeacherPojo> teacherList) {
		this.teacherList = teacherList;
	}

	public List<DictionaryPojo> getClassList() {
		return classList;
	}

	public void setClassList(List<DictionaryPojo> classList) {
		this.classList = classList;
	}

	public List<StudentPojo> getStudentList() {
		return studentList;
	}

	public void setStudentList(List<StudentPojo> studentList) {
		this.studentList = studentList;
	}

	@Override
	public String toString() {
		return "CourseManageDto [id=" + id + ", name=" + name + ", description=" + description + ", syllabus="
				+ syllabus + ", teacherRelationship=" + teacherRelationship + ", studentRelationshipList="
				+ studentRelationshipList + ", classRelationshipList=" + classRelationshipList + ", teacherList="
				+ teacherList + ", classList=" + classList + ", studentList=" + studentList + "]";
	}
}
